home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Isometric Game Programming with DirectX 7.0
/
Isometric Game Programming.iso
/
source
/
chapter13
/
isohex13_2
/
tileset.h
< prev
Wrap
C/C++ Source or Header
|
2000-06-19
|
1KB
|
71 lines
// TileSet.h: interface for the CTileSet class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_TILESET_H__793CAFA2_45E3_11D4_A1EE_B431B7F27368__INCLUDED_)
#define AFX_TILESET_H__793CAFA2_45E3_11D4_A1EE_B431B7F27368__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "GDICanvas.h"
#include "DDFuncs.h"
//tileset information structure
struct TILEINFO
{
RECT rcSrc;//source rectangle
POINT ptAnchor;//anchoring point
RECT rcDstExt;//destination extent
};
class CTileSet
{
private:
//number of tiles in tileset
DWORD dwTileCount;
//tile array
TILEINFO* ptiTileList;
//filename from which to reload
LPSTR lpszReload;
//offscreen plain directdrawsurface7
LPDIRECTDRAWSURFACE7 lpddsTileSet;
public:
//constructor
CTileSet();
//destructor
~CTileSet();
//load(initializer)
void Load(LPDIRECTDRAW7 lpdd,LPSTR lpszLoad);
//reload(restore)
void Reload();
//unload(uninitializer)
void Unload();
//get number of tiles
DWORD GetTileCount();
//get tile list
TILEINFO* GetTileList();
//get surface
LPDIRECTDRAWSURFACE7 GetDDS();
//retrieve filename
LPSTR GetFileName();
//blit a tile
void PutTile(LPDIRECTDRAWSURFACE7 lpddsDst,int xDst,int yDst,int iTileNum);
};
#endif // !defined(AFX_TILESET_H__793CAFA2_45E3_11D4_A1EE_B431B7F27368__INCLUDED_)